﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Renamer.Forms
{
    public partial class FormErrorLog : Form
    {
        bool exiting = false;

        public FormErrorLog(List<string[]> errorList)
        {
            InitializeComponent();
            listView1.Items.Clear();
            foreach (string[] error in errorList)
            {
                listView1.Items.Add(error[0]);
                listView1.Items[listView1.Items.Count - 1].SubItems.Add(error[1]);
                listView1.Items[listView1.Items.Count - 1].SubItems.Add(error[2]);
                Application.DoEvents();
                if (exiting) { break; }
            }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            exiting = true;
            Close();
        }
    }
}
